<template>
  <div>
    <c-title :hide="false" :text="title">
    </c-title>
    <!--<div style="height: 40px"></div>-->
    <div id="a_content" class="content" v-html="content"></div>
  </div>
</template>

<script>
// import cTitle from "components/title";
import { Toast } from 'vant';

export default {
  data() {
    return {
      content: "",
      title: "",
      type:"",//协议类型
    };
  },
  activated() {
    this.type = this.$route.query.show;
    this.getData();
  },
  methods: {
    getData() {
      let that = this;
      let url = 'member.member-info.get-agreements'

      $http
        .get(url, "加载中")
        .then(
          (response)=> {
            if (response.result === 1) {
              that.content = response.data.privacy_policy.content;
              that.title = response.data.privacy_policy.title;
            } else {
              Toast(response.msg);
            }
          },
          (response)=> {
            console.log(response);
          }
        );
    }
  },
  components: {
    // cTitle
  }
};
</script>

<style lang="scss" rel="stylesheet/scss" scoped>
  .content {
    padding: 1rem;
  }
</style>
